package com.situ.mall.pattern.observer;

public class Demo {
    public static void main(String[] args) {
        NewsPaper newsPaper = new NewsPaper();
        Reader reader1=new Reader("张三");
        Reader reader2=new Reader("李四");
        Reader reader3=new Reader("王五");
        newsPaper.attach(reader1);
        newsPaper.attach(reader2);
        newsPaper.attach(reader3);

        newsPaper.setContent("观察者模式");
    }
}
